# for循环
# range [begin,end) 左闭右开
# for i in range(1, 11):
#     print(i)

# for i in range(2, 11, 2):
#     print(i)

# for i in range(10, 0, -1):
#     print(i)

# Thesum = 0
# for i in range(1, 101):
#     Thesum += i
# print(Thesum)

# continue break
# for i in range(1, 6):
#     if i == 3:
#         continue
#     print(f'第{i}个')

# for i in range(1, 6):
#     if i == 3:
#         break
#     print(f"第{i}个")

thesum = 0
count = 0

while True:
    n = input("请输入一个数字（以分号为结束）:")
    if n == ';':
        break
    n = float(n)
    thesum += n
    count += 1
print(f"平均值为{thesum / count}")
